<html>
<head><meta charset="utf-8"><title>Libraries linked by default? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Libraries.20linked.20by.20default.3F.html">Libraries linked by default?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="187854515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Libraries%20linked%20by%20default%3F/near/187854515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Libraries.20linked.20by.20default.3F.html#187854515">(Feb 10 2020 at 20:25)</a>:</h4>
<p>It looks like, by default, rustc adds <code>"-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"</code> to the linker command line on Linux. I'm trying to find out where these come from. It looks like <em>some</em> of those might come from link directives in std, or in std's <a href="http://build.rs" target="_blank" title="http://build.rs">build.rs</a> file. But in particular, I'm not finding where <code>-lutil</code> comes from.</p>



<a name="187856165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Libraries%20linked%20by%20default%3F/near/187856165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Libraries.20linked.20by.20default.3F.html#187856165">(Feb 10 2020 at 20:45)</a>:</h4>
<p>Seems to come from libc, cf. <a href="https://github.com/rust-lang/libc/pull/246" target="_blank" title="https://github.com/rust-lang/libc/pull/246">https://github.com/rust-lang/libc/pull/246</a></p>



<a name="187856452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Libraries%20linked%20by%20default%3F/near/187856452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Libraries.20linked.20by.20default.3F.html#187856452">(Feb 10 2020 at 20:48)</a>:</h4>
<p>Ah, sure enough, thank you.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>